﻿using System;
using System.Numerics;

namespace NodeBasedSkillEditor.Model.Node
{
    [Node(Category = DAGHelper.CateName_GameEvent, Name = "Dialog")]
    [NodeTypeGroup(TypeGroupId = 1, AllowedTypes = new Type[] { typeof(int), typeof(float), typeof(Vector2), typeof(Vector3) })]
    public class Node_Dialog : NodeData
    {
        [Port(IOType = EPortIOType.Input)]
        public FlowPort In = new FlowPort();

        [Port(IOType = EPortIOType.Input)]
        public StringPort Dialog = new StringPort();

        [PortClusterGroup(Name = "Dialog Choice")]
        public PortClusterGroup Dialogs = new PortClusterGroup(typeof(PortCluster_DialogChoice));

    }

    public class PortCluster_DialogChoice : PortCluster
    {
        [Port(IOType = EPortIOType.Input)]
        public BooleanPort Condition = new BooleanPort(true);

        [Port(IOType = EPortIOType.Input)]
        public StringPort Content = new StringPort("");

        //[Port(IOType = EPortIOType.Input, TypeGroup = 1)]
        //public PortGroup GroupTest = new PortGroup(typeof(ValuePort));

        //[Port(IOType = EPortIOType.Input, TypeGroup = 1)]
        //public ValuePort MultiTypeTest = new ValuePort();

        [Port(IOType = EPortIOType.Output)]
        public FlowPort Choice = new FlowPort();
    }
}
